import React from 'react'
import { useDispatch,useSelector } from 'react-redux'
function Home() {
  const username = useSelector((state:{username:string,password:number}) => state.username)
  const dispatch = useDispatch()
  const handleClick = () => {
    dispatch({type:"abc",payload:{
      username: "admin11111111111",
      password: 1231231111111111,
    }})
  }
  
  return (
    <div onClick={()=>handleClick()}>
      Home{username}
    </div>
  )
}

export default Home
